home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 27
/
q27.d81
/
t.dt128 docs 10
< prev
next >
Wrap
Text File
|
2022-08-28
|
13KB
|
460 lines
EXIT
Exits terminal mode.
Syntax: EXIT
CDELAY
Allows you to vary the transmission speed of characters transmitted to
the modem.
Syntax: CDELAY x
Where x is an explicit value 0-255, 0 is full speed, 255 is slowest. This
is the same as the delay factor in the buffer menu.
LDELAY
Allows an extra pause after a carriage return is transmitted to the
modem. This can be used to allow the host system to process the previous
line you transmitted.
Syntax: LDELAY x
Where x is an explicit value 0-255, in increments of 2 jiffies, 0 is
no pause after each line, 255 means pause 510 jiffies after transmitting a
carriage return. This is the same as the delay factor in the buffer menu.
SLEEP
Causes the script to "sleep" or pause.
Syntax: SLEEP x
x is an explicit value 0-255 in 1 jiffy increments. A value of 1
means to "sleep" for 1 jiffy, a value of 255 means to pause for 255
jiffies, a value of 0 means to pause for 256 jiffies.
DELAY
Time is not a standard unit (ex. jiffy) but cause a delay similar to
the delay used for transmitted characters. A value of 1 is the briefest
delay up to 255 (a value of zero is equivalent to 256). The value must be
declared explicitly.
Syntax: DELAY x
x = 0-255
WAIT
Allows the script to wait until a specified string is received.
Syntax: WAIT "Press a key" x
x = 0-255 (zero means 256)
Wait up to x seconds for the string "Press a key"
PROMPT
This is useful to synchronize the script to a specific prompt.
Syntax: PROMPT "send string" x "receive string" y
Sends the "send string" every x seconds until the "receive" string has
been received. Repeat up to y times.
x & y = 0 - 255 (zero means 256)
PERFORM
Equivalent to BASIC's "GOSUB" statement. Performs a subroutine.
Syntax: PERFORM subroutine
where "subroutine" is an address label.
Example:
PERFORM set{CBM-@}device{CBM-@}to{CBM-@}8
.
.
END
set{CBM-@}device{CBM-@}to{CBM-@}8 DEVICE 8 0
RETURN; return to calling routine
RETURN
Equivalent to BASIC's "RETURN" statement. Returns to the previous
PERFORM instruction
Syntax: RETURN
Any section of code that is used as a subroutine should conclude with
a RETURN instruction.
GOTO
Equivalent to BASIC's "GOTO" statement except that instead of
providing a line number you must provide an address label.
Syntax: GOTO label
Example:
GOTO exit
.
. exit END
SELECT/CASE/UNTIL
This is perhaps the most powerful script instruction. It allows you
to perform a task depending on which character string you receive from the
modem.
Syntax: Select x
CASE "receive this" do this
.
.
.
CASE "receive this" do this
UNTIL "this string received"
x is the duration time for the loop and must be stated explicitly. If
you specify a value of zero the SELECT instruction continues indefinitely
until the string specified in the UNTIL clause is received. Any other
value is the number of seconds the loop continues.
You must specify at least 1 CASE clause and not more than 255 (if you
find a purpose for that many CASE statements perhaps you should find a new
hobby).
The CASE clause has two parts and can be in several formats. For the
first part you must specify a "receive" string for each CASE. The second
part of the CASE clause can be structured in 1 of 3 ways:
1. If you specify a literal string or label string that string is
transmitted to the modem if the receive string specified for that CASE is
received.
2. You can specify a GOTO instruction. If you do this you must
specify the address label to go to. If the receive string occurs the GOTO
is executed and the entire SELECT instruction is completed.
3. You can specify a PERFORM instruction. If you do this you must
specify the name of the subroutine to PERFORM should the receive string
occur. If it does the subroutine is executed. When the subroutine
executes its RETURN instruction the SELECT instruction continues at the
exact point it was before the PERFORM.
Any characters processed during the execution of the subroutine are
"invisible" to the SELECT structure that did the PERFORM.
Example:
SELECT 20
CASE "1" "received 1"
CASE "2" GOTO process{CBM-@}2
CASE "3" PERFORM process{CBM-@}3
UNTIL "4"
This SELECT will monitor characters being received for up to 20
seconds. If a "1" is received it transmits the string "received 1" to the
modem.
The loop continues to run and will send that string each time a "1" is
received. If a "2" is received the SELECT stops and program execution
continues at "process{CBM-@}2", an address label. If we receive a "3" we perform
the subroutine "process{CBM-@}3". When that subroutine is done processing
continues at the point when the PERFORM was executed. Time is "frozen"
while a PERFORM instructions is executed, meaning that if the loop was to
run for 5 more seconds before it timed out when the PERFORM was executed,
when control returns to the select the loop will still run for 5 seconds no
matter how long the subroutine took to complete. If a "4" is received at
any time during the SELECT the loop ends.
HANGUP
Hang up the modem.
Syntax: HANGUP
EQUAL
Allows comparison of 2 numbers. If they are equal then branch to the
address label specified.
Syntax: EQUAL number1 x branch
where number1 is a numeric label defined with the NUMBER instruction x
is a value 0-65535. Any combination of literal values and numeric labels
is valid. If the 2 numbers are equal then continue processing at the
address label specified.
LESS, GREATER, NOTEQUAL all work in a similar fashion.
Example:
LESS number1 number2 branch
can be read as "If number1 < number2 then branch"
GREATER number1 number2 branch
can be read as "If number1 > number2 then branch"
NOTEQUAL number1 number2 branch
can be read as "If number1 <> number2 then branch"
ADD SUBTRACT MULTIPLY DIVIDE
Allows simple integer math functions.
Syntax: ADD number1 x overflow{CBM-@}branch
SUBTRACT number2 number1 overflow{CBM-@}branch
MULTIPLY number1 x overflow{CBM-@}branch
DIVIDE number2 x overflow{CBM-@}branch
For all 4 instructions you must specify 2 numbers. The first number
must be a numeric label (label defined by NUMBER). The second number can
be a literal value or a numeric label. The result is stored in the first
number specified. For ADD the second number is added to the first with the
result being stored in the first. For SUBTRACT the second number is
subtracted from the first with the result being stored in the first. For
MULTIPLY the 2 numbers are muliplied with the result being stored in the
first. For DIVIDE the first number is divided by the second with the
quotient being stored in the first. The remainder is lost.
You must supply an address label for each instruction. If the result
of a calculation exceeds 65535 or less than 0 the branch is taken. This
allows you to take action if an overflow or underflow occurs which throws
off the integrity of the numeric label.
ASSIGN
Assigns a value to a numeric label. Similar to BASIC's "LET"
statement.
Syntax: ASSIGN number 12
ASSIGN number number2
The first number specified must be a numeric label. The second can be
it literal or numeric label.
GETKEY
Allows you to read the keyboard.
Syntax: GETKEY numeric{CBM-@}label
The ASCII value of the character read from the keyboard is stored in
the numeric label specified.
DASCII
Displays the Ascii character of a numeric value (similar to BASIC's
"CHR$")
Syntax: DASCII numeric{CBM-@}label
This command is intended mainly as a method of displaying the
character read from the keyboard using the GETKEY command. It displays the
character of the low byte of the numeric value (the rem